package com.doit.day01;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class _03_idea连接redis {
    public static void main(String[] args) {
       /* Jedis jedis = new Jedis("linux01",6379);
        jedis.set("name","idea");*/

        JedisPool jedisPool = new JedisPool("linux01",6379);
        Jedis jedis = jedisPool.getResource();

        jedis.setex("phone",60,"123456");
        String value = jedis.get("name");
        System.out.println(value);

    }
}
